package org.chen;

import org.chen.bas.intercept.AuthIntercept;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication
@MapperScan("org.chen.*.mapper")
//@ServletComponentScan("org.chen.bas.monitoring")
public class TestAPP implements WebMvcConfigurer {
    public static void main(String[] args) {
        SpringApplication.run(TestAPP.class,args);
    }
    @Autowired
    private AuthIntercept authIntercept;

//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(authIntercept)
////                拦截所有请求
//                .addPathPatterns("/**")
////                放行登录请求
//                .excludePathPatterns("/login","/loginout");
//    }
}
